1. Field of the Invention
This invention relates to computer interfaces and resource sharing, and more particularly to a method and apparatus storing within a memory resident within a computer system a program to be executed by a remote processor.
2. Description of Related Art
It is common today for a general purpose local processor to be assisted by a number of other more specialized processing devices. For example, even relatively small computers (such as personal computers) have a general purpose local "host" processor that performs a majority of the processing related to applications to be performed by the computer. For example, the host processor reads the instructions which are part of an application, such as a word processing program, and determines which of the processors are to perform the function. Such host processors are typically assisted by at least a video processor, a digital signal processor, an I/O control processor, a math coprocessor, and other such processing devices.
In some instances, such as in the case of laptop computers, some of the processing is performed by remote devices coupled to the laptop computer through external ports, such as the well-known PCMCIA port available on many modern laptop computers. These external ports allow the laptop computer to be versatile, lightweight, and inexpensive. One example of a peripheral device which may be coupled to a PCMCIA port is a modem. Modems are well-known devices that allow information to be transmitted and received over telephone lines. Accordingly, by coupling a modem to the PCMCIA port of a laptop computer, the laptop computer may transmit and receive information to and from any other device that is similarly connected to the other end of the telephone line.
FIG. 1 is a block diagram of a system in accordance with one method for coupling an External Processing Device 104 to a Host Computer 100. The External Processing Device 104 is packaged together with a data buffer 118, a I/O buffer 108, a program memory 110, and a data memory 112. The External Processing Device 104 within the external device 102 receives commands from the Host Computer 100 through an I/O bus 106 coupled between the Host Computer 102 and an I/O buffer 108. The External Processing Device 104 reads the commands from the I/O buffer 108 and executes programs from the program memory 110. When a command is received, the External Processing Device 104 sets a program counter (PC) 120 starting address. The starting address indicates which program instruction is to be fetched from the program memory 110 to be executed by the External Processing Device 104.
Data can be obtained by the External Processing Device 104 either directly from a data memory 112 within the external device 102 or from a host data memory 114 within the Host Computer 100. For example, if the external device performs video compression, then uncompressed video data may be read from the host data memory 114 and compressed video data stored back in the host data memory 114. Later, the compressed video data is read from the host data memory 114 and decompressed. When data is to be read from the host data memory 114, a direct memory access (DMA) operation is performed. Such DMA operations are well known in the art. Typically, a request is made for data to be read or written to the memory together with a start address and block size. The data is then read (or written) from (or to) the host data memory 114 under the control of a DMA device 116 which writes (or reads) the data to (or from) a DMA buffer memory 118. DMA operations allow the data to be transferred without the involvement of the host processor 122 or the External Processing Device 104. One of the problems with this architecture is that in some circumstances, such as in modem, voice recognition, audio processing, and video processing applications, the amount of work that the external processor 104 must do is greater than the processing resources available.
In such cases, as shown in FIG. 2, some external devices, such as modems, include a Control Processor (CP) 201 which off loads some of the overhead functions which need to be performed in the external processor 204, which, for example, in a modem is typically a digital signal processor (DSP). Commands sent from the Host Computer 100 over the I/O bus 106 are buffered in the command buffer memory 208. The CP 201 decodes those commands from the Host Computer 100 and provides commands and control functions to the DSP 204. Accordingly, the CP 201 performs functions which do not require the special arithmetic capabilities of the DSP 204. Thus the CP 201 off loads from the DSP 204 interface tasks, overhead tasks, and other functions for which the DSP 204 is not particularly designed and suited in order to allow the DSP 204 more processing resources to use in performing specialized arithmetic functions needed in modulation and demodulation tasks, such as calculating Fourier transforms.
However, in the architecture shown in FIG. 2, due to the size of the CP 201 and the complexity of the CP function performed by the CP 201, in addition to memories 212, 210 required to store DSP programs and data, relatively large and expensive memory devices 211, 213 are required to hold the CP function program instructions and CP data. In order to reduce the cost and size of modems, some modem manufacturers have implemented a "host based" system. Host based systems move the CP function from a modem 202 into the Host Computer 100. FIG. 3 is a block diagram of a modem 302 and Host Computer 300 configured as a host based modem system. As shown, the program instructions for the CP function (i.e., the "CP Function Program" code 304) reside in the Host Memory 306. A central processing unit (CPU) 308 within the Host Computer 300 executes the PC function program 304. Accordingly, the external device 302 is smaller and less expensive without a substantial increase in the size or burden placed on the Host Computer 300. However, the CP function must be written in a program language that can be executed by the Host Computer 300. Furthermore, the CPU 308 must execute the CP function in accordance with rules set by the Host Computer operating system. Accordingly, some additional burdens are encountered in host based systems. For example, the fact that the CP Function Program Code must be compatible with the Host Computer's operating system means that a different CP Function Program Code must be written for each type of operating system with which the external device is intended to be used. More specifically, if the manufacturer of a modem wishes to sell the modem for use with a Windows-based system, then Windows based CP Function Program Code must be written. If the manufacturer also wishes to sell the modem for use with DOS-based systems, a separate CP Function Program Code must be written for the DOS operating system. Since there are several operating systems used in Host Computers today, and these operating systems are occasionally upgraded to operating systems which are either not downwardly compatible, or which cause consumer demand for programs designed specifically for the new version of the operating system, the amount of development time required to write and debug the CP Function Program Codes is burdensome.
Accordingly, it would be desirable to provide a method and apparatus for coupling an External Processing Device to a Host Computer in such a way that the external device need not include a large, expensive memory, and yet such that only one CP Function Program Code need be written to accommodate all the possible Host Computers with which the external device may be used. The present invention provides such a method and apparatus.